using System;
using TimeSheetDAL;

namespace TimeSheetBLL
{

	[TableAttribute("administrator")]
	[PrimaryKeyAttribute("admin_id", "ID")]
	[ColumnAttribute("admin_name", "AdminName")]
	[ColumnAttribute("password", "Password")]
	[ColumnAttribute("admin_email", "Email")]
	[ColumnAttribute("active", "Active")]
	public class Administrator : IDBEntity
	{

		private string adminName;
		private string password;
		private string email;
		private bool active;
		private long iD;

		public Administrator()
		{
			this.active = true;
		}

		public bool Authenticate()
		{
			DBFacade dbf = new DBFacade();
			return dbf.Authenticate( this );
		}

		#region Generated

		public long ID
		{

			get
			{
				return this.iD;
			}set
			 {
				 this.iD = value; 
			 }
		}

		public string AdminName
		{

			get
			{
				return this.adminName;
			}set
			 {
				 this.adminName = value; 
			 }
		}

		public string Password
		{

			get
			{
				return this.password;
			}set
			 {
				 this.password = value; 
			 }
		}

		public string Email
		{

			get
			{
				return this.email;
			}set
			 {
				 this.email = value; 
			 }
		}

		public bool Active
		{

			get
			{
				return this.active;
			}set
			 {
				 this.active = value; 
			 }
		}

		#endregion

	}//class
}//namespace